namespace path_utils
{
	inline string unify_path(const char* path)
	{
		string result(path);
		std::replace(result.begin(), result.end(), '\\', PATH_DELIMITER);
		return result;
	}

	inline string get_directory(const char* filepath)
	{
		string result = unify_path(filepath);
		string::size_type index = result.find_last_of(PATH_DELIMITER);
		if (index != string::npos)
			result.erase(index + 1);

		return result;
	}
}